home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / init.d / binfmt-support < prev    next >
Encoding:
Text File  |  2005-10-27  |  1.1 KB  |  53 lines

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:          binfmt-support
  4. # Required-Start:    $local_fs $remote_fs
  5. # Required-Stop:     $local_fs $remote_fs
  6. # Default-Start:     2 3 4 5
  7. # Default-Stop:      0 1 6
  8. # Short-Description: Support for extra binary formats
  9. # Description:       Enable support for extra binary formats using the Linux
  10. #                    kernel's binfmt_misc facility.
  11. ### END INIT INFO
  12.  
  13. PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  14. NAME=binfmt-support
  15. DESC="additional executable binary formats"
  16.  
  17. test -x /usr/sbin/update-binfmts || exit 0
  18.  
  19. . /lib/lsb/init-functions
  20. . /etc/default/rcS
  21.  
  22. set -e
  23. CODE=0
  24.  
  25. case "$1" in
  26.   start)
  27.     log_daemon_msg "Enabling $DESC" "$NAME"
  28.     update-binfmts --enable || CODE=$?
  29.     log_end_msg $CODE
  30.     exit $CODE
  31.     ;;
  32.  
  33.   stop)
  34.     log_daemon_msg "Disabling $DESC" "$NAME"
  35.     update-binfmts --disable || CODE=$?
  36.     log_end_msg $CODE
  37.     exit $CODE
  38.     ;;
  39.  
  40.   restart|force-reload)
  41.     $0 stop
  42.     $0 start
  43.     ;;
  44.  
  45.   *)
  46.     N=/etc/init.d/$NAME
  47.     echo "Usage: $N {start|stop|restart|force-reload}" >&2
  48.     exit 1
  49.     ;;
  50. esac
  51.  
  52. exit 0
  53.